{% load wiki_markup %}

<div id="{{object.slug}}" class="object">

    <div id="{{object.slug}}Header" class="objectHeader">
    
        <h2 class="objectTitle"><a href="{{object.get_absolute_url}}">{{ object.title }}</a></h2>
    

    <span id="{{object.slug}}Details" class="objectDetails">
    
    {% if object.date_time %}
        posted 
        {{ object.date_time|date:"D d M Y" }}
    {% endif %}
    
    {% if object.date_added %}
        added 
        {{ object.date_added|date:"D d M Y" }}
    {% endif %}
    
    </div>
    <div id="{{object.slug}}Content" class="objectContent">
        
        {{ object.intro|wiki_to_html }} 
    
    
    <!-- if object is a photo gallery, display sample photos-->
        {% ifequal object.object_name "Gallery" %}
            {% for photo in object.photos.all.reverse %}
                        
    

        <div class="figure photo_preview">
            <p> <a href="{{ photo.get_absolute_url }}"><img src="{{ photo.get_thumbnail_url }}" class="thumbnail" alt="{{ photo.title }}"/></a>
                  <p>
                    
                    {{ photo.title }}<br />
                    
                    {% if photo.caption %}
                    {{ photo.caption_short }} <br />
                    {% endif %}
                    {{ photo.copyright }}
                  </p>
            </p>
        </div>

            {% endfor %}
        {% endifequal %}
    </div>
    
    <!-- if object is a photo, display its preview-->
    {% if object.image %}
        <div class="figure">
            <p> <a href="{{ object.get_absolute_url }}"><img src="{{ object.get_thumbnail_url }}" class="thumbnail" alt="{{ object.title }}"/></a>
                  <p>
                    
                    {{ object.title }}<br />
                    
                    {% if object.caption %}
                    {{ object.caption }}<br />
                    {% endif %}
                  </p>
            </p>
        </div>
    {% endif %}
    

</div>
